//
//  DataManager.h
//  NetworkMudleDemo
//
//  Created by 马晨曦 on 2019/5/13.
//  Copyright © 2019 VergilMa. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "ConverterProtocol.h"



NS_ASSUME_NONNULL_BEGIN
@class DataManager;

@protocol DataManagerProtocol <NSObject>

- (void)dataManagerDidSuccess:(DataManager *)manager;

@end


@protocol ConverterProtocol;

typedef NS_ENUM(NSInteger ,DataType){
    dataTypeDef,
    dataTypeA,
    dataTypeB
};

@interface DataManager : NSObject

@property (nonatomic,strong) NSString *netData;



@property (nonatomic,weak) id<DataManagerProtocol> delegate;

- (void)refreshDataWithType:(DataType)dataType;

- (NSDictionary *)fetchDataWithConverter:(id<ConverterProtocol>)converter;

@end



NS_ASSUME_NONNULL_END
